package com.bdqn.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;

public interface BaseMapper <T> extends Mapper<T> {
    int insert(T entity);
    int deleteById(Serializable id);
    int delete(@Param("ew")  Wrapper <T>   wrapper);
    int deleteBatchIds(@Param("coll")Collection<? extends Serializable> idList);
    int updateById(@Param("et") T entity);
    int update(@Param("et") T entity,@Param("ew") Wrapper<T> updateWrapper);
    T selectById(Serializable id);
    List<T>selectBachIds(@Param("cm")Map<String, Objects> columnMap);
    T selectOne(@Param("ew") Wrapper <T>  queryWrapper);
    Integer selectCount(@Param("ew")Wrapper <T> queryWrapper);
    List<T>selectList(@Param("ew")Wrapper<T>queryWrapper);
    List<Map<String,Objects>>selectMaps(@Param("ew")Wrapper<T>queryWrapper);
    List<Objects>selectObject(@Param("ew")Wrapper<T>queryWrapper);
    IPage<T>selectPage(IPage<T>page,@Param("ew")Wrapper<T>queryWrapper);
    IPage<Map<String,Objects>>selectMapsPage(IPage<T>page,@Param("ew")Wrapper<T>queryWrapper);
}
